import java.util.List;
import java.util.Objects;

/**
 * @author : weixiang
 * create at:  2019-10-16
 * @description:
 */
public class WeightConfig {

    private Double weight;
    private List<ItemWeight> itemWeight;

    public WeightConfig() {}


    public WeightConfig(Double weight) {
        this.weight = weight;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public List<ItemWeight> getItemWeight() {
        return itemWeight;
    }

    public void setItemWeight(List<ItemWeight> itemWeight) {
        this.itemWeight = itemWeight;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof WeightConfig)) return false;
        WeightConfig that = (WeightConfig) o;
        return getWeight().equals(that.getWeight()) &&
                getItemWeight().equals(that.getItemWeight());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getWeight(), getItemWeight());
    }
}
